package com.topvision.service.impl.zwan;

import com.topvision.annotation.DataSource;
import com.topvision.db.DataSourceConstants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import com.topvision.mapper.zwan.UserinfoMapper;
import com.topvision.model.zwan.Userinfo;
import com.topvision.service.zwan.UserinfoService;

@Service("userinfoService")
public class UserinfoServiceImpl implements UserinfoService {
	@Autowired
	private UserinfoMapper userinfoMapper;
	
	@Override
	@DataSource(DataSourceConstants.ORACLE_PORTAL_SLAVE)
	public Userinfo queryObject(BigDecimal zwanid){
		return userinfoMapper.queryObject(zwanid);
	}
	
	@Override
	@DataSource(DataSourceConstants.ORACLE_PORTAL_SLAVE)
	public List<Userinfo> queryList(Map<String, Object> map){
		return userinfoMapper.queryList(map);
	}
	
	@Override
	@DataSource(DataSourceConstants.ORACLE_PORTAL_SLAVE)
	public int queryTotal(Map<String, Object> map){
		return userinfoMapper.queryTotal(map);
	}
	
	@Override
	@DataSource(DataSourceConstants.ORACLE_PORTAL_SLAVE)
	public void save(Userinfo userinfo){
		userinfoMapper.save(userinfo);
	}
	
	@Override
	@DataSource(DataSourceConstants.ORACLE_PORTAL_SLAVE)
	public void update(Userinfo userinfo){
		userinfoMapper.update(userinfo);
	}
	
	@Override
	@DataSource(DataSourceConstants.ORACLE_PORTAL_SLAVE)
	public void delete(BigDecimal zwanid){
		userinfoMapper.delete(zwanid);
	}
	
	@Override
	@DataSource(DataSourceConstants.ORACLE_PORTAL_SLAVE)
	public void deleteBatch(BigDecimal[] zwanids){
		userinfoMapper.deleteBatch(zwanids);
	}
	
}
